<%-- 
    Document   : SearchBookInfoResult
    Created on : 2020-4-21, 23:06:36
    Author     : zhang
--%>

<%@page import="dao.BookDao"%>
<%@page import="entity.Book"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>搜索结果</h1>
        <div style="position:absolute;left:300px;top:50px"><a href="Admin.jsp">返回</a></div>
        <table>
            <tr><th>书名</th><th>作者</th><th>出版社</th><th>编号</th><th>类型</th></tr>
        <%
            String keyword=request.getParameter("keyword");
            %>
            <%
            List<Book> list1=new BookDao().getUndeletedBookByKeyword(keyword);
            
            %>
            
            <%
            for(Book book:list1){
        %>
            <tr><td><%=book.getBookName()%></td><td><%=book.getAuthor()%></td><td><%=book.getPublishHouse()%></td><td><%=book.getId()%></td><td><%=book.getType()%></td>
                <td><a href="BookInfo.jsp?bookid=<%=book.getId()%>" target="blank">查看详情</a></td>
                <td><a href="dbs?bookid=<%=book.getId()%>">删除图书</a></td></tr>
            <%
                }
%></table>
    </body>
</html>
